#include <stdio.h>

int main()
{
    printf("Hello World!\n");

    int data = 0b00000001;      //二进制1，data = 2^0 = 1
    int data2 = 0B00000011;     //二进制3, data2 = 2^0 + 2^1 = 3
    int data3 = 0b00000111;    //二进制7, data3 = 2^0 + 2^1 + 2^2 = 7
    int data4 = 0b00010110;    //二进制22，data4 = 0 + 2^1 + 2^2 + 0 + 2^4 = 22

    int num1 = 011;    //八进制9，num1 = 1 * 8^0 + 1 * 8^1 = 9
    int num2 = 02;    //八进制2, num2 = 2 * 8^0 = 2
    int num3 = 0101;  //八进制65，num3 = 1 * 8^0 + 0 + 1 * 8^2 = 85

    int m1 = 0x05;    //十六进制5, m1 = 5 * 16 ^ 0 = 5
    int m2 = 0X21;    //十六进制33, m2 = 1 + 2 * 16^1 = 33

    printf("二进制，data = %d, data2 = %d, data3 = %d, data4 = %d\n", data, data2, data3, data4);
    printf("八进制，num1 = %d, num2 = %d, num3 = %d\n", num1, num2, num3);
    printf("十六进制，m1 = %d, m2 = %d\n", m1, m2);

    return 0;
}
